<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>

</body>
<script>
    // 数组
    const F4 = ['nanfeng', 'mortal', 'mingquan', 'lanting'];
    let [a, b, c, d] = F4;
    console.log(a, b, c, d);

    // 对象
    const person = {
        name: 'nanfeng',
        age: 18,
        sex: 'male',
        dance: function () {
            console.log('dance');
        }
    };
    let { name, age, sex, dance } = person;
    console.log(name, age, sex, dance);
    dance();

    // 只取对象中的一个值
    {
        const nanfeng = {
            name: 'mortal',
            age: 18
        }
        let { name } = nanfeng;
        console.log(name);
    }


</script>

</html>